#ifndef MSGTHREAD_H
#define MSGTHREAD_H

#include <QThread>
#include <winsock2.h>
#include <iostream>
#include <string>
#include <vector>
#include <socktooler.h>
#include "createmymsg.h"
using namespace std;

//这个是客户端的;
class MsgThread : public QThread{
  Q_OBJECT
public :
    explicit MsgThread(SOCKET receive);
    void run();
    string GetName();
signals :
    void LoginRSP(string content);
    void RegistRSP(string content);
    void MsgComing(string from, string content);
    void HeartBRSP(string content);

public slots :

private:
    SOCKET receive_sock;
    string my_user_name;
    void DealMsg(TransMsg trans_msg);
};

#endif // MSGTHREAD_H
